package com.binyouwei.designpatterns.structural_type.decorate;

/**
 * @author 宾有为
 * @date 2024/7/11 19:47
 * @link https://blog.csdn.net/baidu_41616022?type=blog
 * @describe：
 **/
public abstract class DecorateShapeDecorator implements DecorateShape{
    protected DecorateShape decorateShape;

    public DecorateShapeDecorator(DecorateShape decorateShape) {
        this.decorateShape = decorateShape;
    }

    @Override
    public void draw() {
        if (decorateShape != null) {
            decorateShape.draw();
        }
    }
}
